import {
  validatePhone,
  validateEmail,
  validateIdCard,
  validateMoney,
  validateBankId,
  validatePassword
} from "@/utils/validates.js"

const modifyInfoForm = {
  formRules: {
    old_password: {
      rules: [
        {
          required: true,
          errorMessage: "请输入当前密码"
        }
      ],
      validateTrigger: "blur"
    },
    new_password: {
      rules: [
        {
          required: true,
          errorMessage: "请输入密码"
        },
        {
          validateFunction: validatePassword
        }
      ]
    },
    confirm_password: {
      rules: [
        {
          required: true,
          errorMessage: "请再次输入密码"
        },
        {
          validateFunction: validatePassword
        }
      ]
    }
  },
  formList: [
    {
      formType: "input",
      name: "old_password",
      label: "当前密码",
      type: "password",
      placeholder: "请输入当前密码",
      value: "",
      required: true
    },
    {
      formType: "input",
      name: "new_password",
      label: "新密码",
      type: "password",
      placeholder: "密码长度不少于6位数",
      value: "",
      required: true
    },
    {
      formType: "input",
      name: "confirm_password",
      label: "重复新密码",
      type: "password",
      placeholder: "密码长度不少于6位数",
      value: "",
      required: true
    }
  ],
  formField: {
    old_password: "",
    new_password: "",
    confirm_password: ""
  }
}
export { modifyInfoForm }
